﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LY.Entity;
using LY.Entity.Entities;

namespace LY.DataAccess.Repository
{
    public class ResourceRepository : BaseRepository
    {
        public List<S_Dept> GetDepartMent()
        {
            string sql = "SELECT * FROM S_Dept ORDER BY path,sequence ";
            return base.Query<S_Dept>(sql, null);
        }

        public List<S_User> GetUser()
        {
            string sql = "SELECT * FROM S_User ORDER BY UserName";
            return base.Query<S_User>(sql, null);
        }

        public List<S_Module> GetModule()
        {
            string sql = "SELECT * FROM S_Module ORDER BY Path";
            return base.Query<S_Module>(sql, null);
        }

        public List<C_Menu> GetMenu()
        {
            string sql = "SELECT ID, Name, UpperID, UpperName, Code, Path, Sequence, URL, Status, NameE, Target, Layer FROM C_Menu ORDER BY Path";
            return base.Query<C_Menu>(sql, null);
        }

        public List<U_BankInfo> GetBankName()
        {
            string sql = "select [Id],[BankCode],[BankName] from [U_BankInfo]";
            return base.Query<U_BankInfo>(sql, null);
        }

        public List<R_ProjectClass> GetProjectClassName()
        {
            string sql = "select Name from R_ProjectClass";
            return base.Query<R_ProjectClass>(sql, null);
        }
        public List<R_ProjectClass> GetProjectType()
        {
            string sql = "select Id,Name from R_ProjectClass";
            return base.Query<R_ProjectClass>(sql, null);
        }

    }
}
